﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="AddClient.aspx.cs" Inherits="admin_AddClient" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>无标题页</title>
  
    <link rel="Stylesheet" type="text/css" href="../Styles/right_style.css" />
    <script type="text/javascript" src="../Scripts/jquery.ui/js/jquery.js"></script>

    <style type="text/css">
<!--
html{ scrollbar-base-color: #dbecf8; scrollbar-arrow-color: #2a8ed1; scrollbar-track-color: #bdddf2; scrollbar-3dlight-color: #2886c5; scrollbar-darkshadow-color: #2886c5;
scrollbar-face-color: #dbecf8; scrollbar-shadow-color: #dbecf8;  }
-->
</style>

</head>
<body>
    <form id="form1" runat="server">
            <div class="sub_right_top">
  <div class="hdm_header" >
    <div class="tb1_on"><h2 class="h2_icon">客户基本信息</h2></div>

    <div class="clear"></div>
  </div>
  <div class="hdm_footer">
    <div class="fabu_gg_title"> <asp:Label ID="Label1" runat="server" Font-Bold="True" Font-Size="14px" ForeColor="Black"></asp:Label></div>            
    <form id="form2" name="form1" method="post" action="">  
    <table width="97%" border="1" align="center" cellpadding="0" cellspacing="0" 
        bordercolor="#77acd0" style="border-collapse:collapse; text-align: left;">
      <tr>
        <td width="120">销售员：</td>

        <td>
            <asp:TextBox ID="txtSellUser" runat="server" ReadOnly="True" Width="90%"></asp:TextBox>
         </td>
      </tr>
      <tr>
        <td width="120">是否为共享客户：</td>

        <td>
          <asp:DropDownList ID="ddlIsShare" runat="server" Font-Size="12px" Height="20px" 
                Width="156px">
                                    <asp:ListItem Value="1">是</asp:ListItem>
                                    <asp:ListItem Value="0">否</asp:ListItem>
                                </asp:DropDownList>
        </td>

      </tr>
      <tr>
        <td width="120">客户名称：</td>
        <td>
          <asp:TextBox ID="txtClientName" runat="server" Width="90%"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtClientName"
                                    ErrorMessage="客户名称不能为空！" Font-Bold="True">*</asp:RequiredFieldValidator>
        </td>
      </tr>
      <tr>

        <td width="120">电话：</td>
        <td>
          <asp:TextBox ID="txtTelephone" runat="server" Width="90%"></asp:TextBox>
        </td>
      </tr>
      <tr>
        <td width="120">传真：</td>
        <td>
        <asp:TextBox ID="txtFaxes" runat="server" Width="90%"></asp:TextBox>
        </td>
      </tr>
      <tr>
        <td width="120">网址：</td>
        <td>
             <asp:TextBox ID="txtURL" runat="server" Width="90%"></asp:TextBox>
            <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" style="left: 410px; top: 237px" ControlToValidate="txtURL" Font-Bold="True" ValidationExpression="http(s)?://([\w-]+\.)+[\w-]+(/[\w- ./?%&=]*)?" ErrorMessage="网址格式不正确！">*</asp:RegularExpressionValidator>
        </td>

      </tr>
      <tr>
        <td width="120">电子邮件：</td>
        <td>
          <asp:TextBox ID="txtEmail" runat="server" Width="90%"></asp:TextBox>
        <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ControlToValidate="txtEmail"
            Font-Bold="True" Style="left: 410px;
            top: 237px" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" ErrorMessage="电子邮件格式不正确！">*</asp:RegularExpressionValidator>
        </td>
      </tr>
      <tr>

        <td width="120">地址：</td>
        <td>
         <asp:TextBox ID="txtAddress" runat="server" Width="90%"></asp:TextBox>
        </td>
      </tr>
      <tr>
        <td width="120">邮政编码：</td>
        <td>
        <asp:TextBox ID="txtPostalcode" runat="server" Width="90%"></asp:TextBox>
        <asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" ControlToValidate="txtPostalcode"
            Font-Bold="True" Style="left: 410px;
            top: 237px" ValidationExpression="\d{6}" ErrorMessage="邮政编码格式不正确！">*</asp:RegularExpressionValidator>
        </td>
      </tr>
      <tr>
        <td width="120">备注：</td>
        <td>
          <asp:TextBox ID="txtRemark" runat="server" Height="50px" TextMode="MultiLine" Width="90%"></asp:TextBox>
        </td>

      </tr>
      <tr>
        <td colspan="2" align="center"><div class="disk_queding_top">
                <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="" CssClass="queding_anniu"/>
        </div>
          <div class="disk_back_top">
          <asp:Button ID="Button3" runat="server" Text="" CausesValidation="False" PostBackUrl="~/admin/FindBlurClient.aspx" CssClass="fanhui_anniu"/>
          </div></td>
        </tr>
    </table>
    <div style="height:20px;"></div>
    </form>
  </div>

</div>

    </form>
</body>
</html>
<script language="javascript">
    function checkfrm()
    {
        if(document.getElementById('txtClientName').value =='')
        {
            alert('客户名称不能为空！');
            return false;
        }
        if(document.getElementById('txtClientName').value.length>100)
        {
            alert('客户名称长度不能大于100个字符！');
            return false;
        }
        if(document.getElementById('txtTelephone').value.length>20)
        {
            alert('电话长度不能大于20个字符！');
            return false;
        }
        if(document.getElementById('txtFaxes').value.length>20)
        {
            alert('传真长度不能大于20个字符！');
            return false;
        }
        if(document.getElementById('txtURL').value.length>50)
        {
            alert('网址长度不能大于50个字符！');
            return false;
        }
        if(document.getElementById('txtEmail').value.length>50)
        {
            alert('电子邮件不能大于50个字符！');
            return false;
        }
        if(document.getElementById('txtAddress').value.length>200)
        {
            alert('地址长度不能大于200个字符！');
            return false;
        }
        if(document.getElementById('txtPostalcode').value.length>50)
        {
            alert('邮编长度不能大于50个字符！');
            return false;
        }
        return true;
    }
</script>